<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.PollsControl"
    CodeBehind="Polls.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-content.png" alt="Polls" />
        Manage Polls
    </div>
    <div class="options">
        <asp:Button runat="server" Text="Save" CssClass="adminButtonBlue" ID="btnSave" ValidationGroup="PollsSettings"
            OnClick="btnSave_Click" ToolTip="Save changes to polls" />
        <input type="button" onclick="location.href='PollAdd.aspx'" value="Add new" id="btnAddNew"
            class="adminButtonBlue" title="Add a new poll" />
    </div>
</div>
<table width="100%">
    <tr>
        <td class="adminTitle">
            <nopCommerce:ToolTipLabel runat="server" ID="lblShowOnMainPage" Text="Show on home page:"
                ToolTip="Check to show polls on your store home page." ToolTipImage="~/Administration/Common/ico-help.gif" />
        </td>
        <td class="adminData">
            <asp:CheckBox runat="server" ID="cbShowPollsOnMainPage" Checked="true"></asp:CheckBox>
        </td>
    </tr>
</table>
<p>
</p>
<asp:GridView ID="gvPolls" runat="server" AutoGenerateColumns="False" Width="100%">
    <Columns>
        <asp:BoundField DataField="PollID" HeaderText="PollID" Visible="False"></asp:BoundField>
        <asp:TemplateField HeaderText="Name" ItemStyle-Width="30%">
            <ItemTemplate>
                <a href="PollDetails.aspx?PollID=<%#Eval("PollID")%>" title="Edit poll">
                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                </a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Language" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="LanguageDetails.aspx?NewsID=<%#Eval("LanguageID")%>" title="Manage store languages">
                    <%#((Language)Eval("Language")).Name%></a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Published" HeaderText="Published" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <%#Eval("DisplayOrder")%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="PollDetails.aspx?PollID=<%#Eval("PollID")%>" title="Edit poll">Edit</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
